/*
 * @Descripttion: vue and node-bs
 * @Author: weijunliang-jul
 * @Date: 2021-02-24 15:32:04
 * @LastEditors: weijunliang-jul
 * @LastEditTime: 2021-02-24 16:08:12
 */

import request from '@/utils/request'

// 获取班级
export function getClasses(inputAddText) {
    return request({
        url: '/admin/getClasses',
        method: 'get',
        params: {
            department: inputAddText,
        }
    })
}

// 添加班级
export function addClasses(classes, departments) {
    return request({
        url: "/admin/addClasses",
        method: "get",
        params: {
            classes: classes,
            departments: departments,
        },
    })
}

// 修改班级
export function upClassesdata(cid, classes) {
    return request({
        url: "/admin/upClassesdata",
        method: "post",
        data: {
            c_id: cid,
            classes: classes,
        },
    })
}  

// 删除班级
export function delClassesdata(c_id) {
    return request({
        url: "/admin/delClassesdata",
        method: "get",
        params: {
          c_id: c_id,
        },
    })
}  

// 搜索词汇查询
export function getClassesSear(inputSearchText, currPage, pageNum) {
    return request({
        url: "/admin/getClassesSear",
        method: "get",
        params: {
          inputText: inputSearchText,
          currPage: currPage,
          pageNum: pageNum,
        },
    })
} 